﻿using Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore;
using System;

namespace WeChat
{
    public static class CourseInfoHelper
    {
        /// <summary>
        /// 获取上课时间
        /// </summary>
        /// <param name="dt"></param>
        /// <param name="lessonNo"></param>
        /// <returns></returns>
        public static string GetCourseTime(DateTime dt,int lessonNo)
        {
            string courseTime = string.Empty;
            DayOfWeek dayOfWeek = dt.DayOfWeek;
            if(dayOfWeek == DayOfWeek.Sunday || dayOfWeek == DayOfWeek.Saturday)
            {
                switch (lessonNo)
                {
                    case 0:
                        courseTime = "09:30";
                        break;
                    case 1:
                        courseTime = "10:30";
                        break;
                    case 2:
                        courseTime = "13:45";
                        break;
                    case 3:
                        courseTime = "14:45";
                        break;
                    case 4:
                        courseTime = "15:45";
                        break;
                    case 5:
                        courseTime = "18:00";
                        break;
                    case 6:
                        courseTime = "19:10";
                        break;
                }
            }
            else
            {
                switch (lessonNo)
                {
                    case 0:

                        courseTime = "09:30";
                        break;
                    case 1:

                        courseTime = "10:30";
                        break;
                    case 2:

                        courseTime = "14:30";
                        break;
                    case 3:

                        courseTime = "15:30";
                        break;
                    case 4:

                        courseTime = "16:30";
                        break;
                    case 5:

                        courseTime = "18:10";
                        break;
                    case 6:

                        courseTime = "19:10";
                        break;
                }
            }
            return courseTime;
        }

        /// <summary>
        /// 获取教室名称
        /// </summary>
        /// <returns></returns>
        public static string GetClassName(int classRoomId)
        {
            string className = string.Empty;
            switch(classRoomId)
            {
                case 0:
                    className = "教室一";
                    break;
                case 1:
                    className = "教室二";
                    break;
                case 2:
                    className = "教室三";
                    break;
                case 3:
                    className = "教室四";
                    break;
                case 4:
                    className = "教室五";
                    break;
                case 5:
                    className = "教室六";
                    break;
                case 6:
                    className = "教室七";
                    break;
                case 7:
                    className = "教室八";
                    break;
                case 8:
                    className = "教室九";
                    break;
                case 9:
                    className = "教室十";
                    break;
                case 10:
                    className = "教室十一";
                    break;
            }
            return className;
        }
    }
}
